package dao

import (
	"zk2/globals"
	"zk2/internal/models"
)

type FriendDao struct {
}

func NewFriendDao() *FriendDao {
	return &FriendDao{}
}

func (f *FriendDao) FriendAdd(friend *models.FriendApply) (*models.FriendApply, error) {
	db := globals.DB
	err := db.Debug().Create(&friend).Error
	return friend, err
}

func (f *FriendDao) FriendCreat(friends *models.Friend) (*models.Friend, error) {
	db := globals.DB
	err := db.Debug().Create(&friends).Error
	return friends, err
}
